package lucid.hrms.management.nationality;

import java.util.List;

import org.codehaus.grepo.core.annotation.Param;
import org.codehaus.grepo.query.commons.annotation.FirstResult;
import org.codehaus.grepo.query.commons.annotation.GenericQuery;
import org.codehaus.grepo.query.commons.annotation.MaxResults;
import org.codehaus.grepo.query.hibernate.annotation.HibernateQueryOptions;
import org.codehaus.grepo.query.hibernate.repository.ReadWriteHibernateRepository;
import org.springframework.stereotype.Repository;

@Repository("nationalityRepository")
public interface NationalityRepository extends ReadWriteHibernateRepository<Nationality, Long> {
	@GenericQuery
	@HibernateQueryOptions(criteriaGenerator = NationalityCriteriaGenerator.class)
	List<Nationality> findNationalities(@Param("nationalityCriteria") NationalityCriteria nationalityCriteria, 
										@FirstResult int firstResult, @MaxResults int maxResults);
}